#! /usr/bin/python
# coding: utf-8

from Tkinter import *

root = Tk()

def printSpin():
    print sb.get()

def printSpin1(event):
    printSpin()
sb = Spinbox(root, values=(0,2,20,40,-1), increment=2, command=printSpin)
sb.bind('<Return>', printSpin1)
sb.pack()

root.mainloop()
